//
//  SISSDatePickerView.h
//  SISSAPP
//
//  Created by 优房网 on 2017/7/13.
//  Copyright © 2017年 优房网. All rights reserved.
//

#import "SISSBaseView.h"

@class SISSDatePickerView;
@protocol SISSDatePickerViewDelegate <NSObject>

/**
 当时间改变时触发
 
 @param choose LTSDateChoose
 @param date 选择的日期
 */
- (void)changeTime:(SISSDatePickerView *)choose date:(NSDate *)date;

/**
 点击确定按钮
 
 @param choose LTSDateChoose
 @param date 选择的日期
 */
- (void)determine:(SISSDatePickerView *)choose date:(NSDate *)date;

@end
@interface SISSDatePickerView : SISSBaseView

//初始化方法
- (instancetype)initWithType:(UIDatePickerMode)type title:(NSString *)title;
//设置初始时间
- (void)setNowTime:(NSDate *)date;


@property (nonatomic,assign) BOOL dateError;

@property (nonatomic,copy) NSString *title;

@property (nonatomic, strong) NSDate *minimumDate;
@property (nonatomic, strong) NSDate *maximumDate;
/// 代理对象
@property (weak, nonatomic) id<SISSDatePickerViewDelegate> delegate;

// NSDate --> NSString
- (NSString*)stringFromDate:(NSDate*)date;
//NSDate <-- NSString
- (NSDate*)dateFromString:(NSString*)dateString;

- (void)showWithAnimation:(BOOL)animation;

- (void)dismissWithAnimation:(BOOL)animation;

@end
